package com.dhcc.bpm.common.utils;

/**
 * @version V1.0
 * @ClassName GatewayLogUtil
 * @Description TODO
 * @Author xiafayu
 * @Date 2020/12/3 14:09
 * @Copyright: 2020 东华软件 .. All rights reserved.
 */
public class GatewayLogUtil {

    public static String getTpsKey(String env_type, String request_date, String request_time){
        StringBuilder stringBuilder = new StringBuilder();

        stringBuilder.append(env_type);
        stringBuilder.append("+");
        stringBuilder.append(request_date);
        stringBuilder.append("+");
        stringBuilder.append(request_time);

        return stringBuilder.toString();
    }

    public static String getApiTpsKey(String env_type, String request_date, String request_time, String opc_api_code){
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(opc_api_code);

        stringBuilder.append(env_type);
        stringBuilder.append("+");
        stringBuilder.append(request_date);
        stringBuilder.append("+");
        stringBuilder.append(request_time);

        return stringBuilder.toString();
    }

    public static String getNumKey(String env_type, String request_date){
        StringBuilder stringBuilder = new StringBuilder();

        stringBuilder.append(env_type);
        stringBuilder.append("+");
        stringBuilder.append(request_date);

        return stringBuilder.toString();
    }

    public static String getApiNumKey(String env_type, String request_date, String opc_api_code){
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(opc_api_code);

        stringBuilder.append(env_type);
        stringBuilder.append("+");
        stringBuilder.append(request_date);

        return stringBuilder.toString();
    }
}
